<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>伪造ajax</title>
</head>
<body>
  <script>
    window.onload = function f(){
      var mydate=new Date();
      document.getElementById("currentTime").innerText = mydate.getTime();
    }
    function loadPage(){
      var targetURL=document.getElementById("url").value;
      console.log(targetURL);
      document.getElementById("iframePosition").src=targetURL;
    }
  </script>
  <div>
    <div>
      <p>address<span id="currentTime"></span></p>
      <p>
        <input type="text" id="url" value="https://www.baidu.com">
        <input type="submit" value="提交" onclick="loadPage()">
      </p>
    </div>
    <h3>加载页面的位置</h3>
    <iframe style="width: 100%;height: 500px" id="iframePosition" src="https://www.ifeng.com/"></iframe>
  </div>
</body>
</html>